package com.qing.microservices.kafkaconsumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author guoqf
 */
@Slf4j
@Component
public class KafkaAcceptor {

    @KafkaListener(topics = "baseMessage", groupId = "baseGroup")
    public void acceptMessage(String message) {
        log.info("acceptMessage Accepted topic[{}] message[{}]", "baseMessage", message);
    }


    @KafkaListener(topics = "baseMessage", groupId = "baseGroup")
    public void acceptMessage1(String message) {
        log.info("acceptMessage1 Accepted topic[{}] message[{}]", "baseMessage", message);
    }


    @KafkaListener(topics = "baseMessage")
    public void acceptMessageDefault(String message) {
        log.info("acceptMessageDefault Accepted topic[{}] message[{}]", "baseMessage", message);
    }
}
